<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j"%>
<%@taglib prefix="rich" uri="http://richfaces.org/rich"%>

<!DOCTYPE html>
<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title><h:outputText value="#{msg.usl_home_title}" /></title>
            <link href="<% out.print(request.getContextPath());%>/resources/css/position.css" rel="stylesheet" type="text/css" />

        </head>
        <body>

            <jsp:include page="/pages/fragments/header.jsp" />


            <jsp:include page="/pages/fragments/uslMenu.jsp" />


            <section>
                <h:form >
                    <rich:panel >
                        <a4j:outputPanel id="tabella">
                            <rich:dataTable value="#{alreadyVisitedListBean.lista}" var="entry" styleClass="wide" >
                                <f:facet name="header">
                                    <h:outputText value="#{msg.patients_list}"/>
                                </f:facet>

                                <rich:column sortBy="#{entry[1]}">
                                    <f:facet name="header">
                                        <h:outputText value="#{msg.patients_list}"/>
                                    </f:facet>
                                    <h:outputText value="#{entry[1]}" />
                                </rich:column>


                                <rich:column sortBy="#{entry[2]}">
                                    <f:facet name="header">
                                        <h:outputText value="#{msg.last_name}"/>
                                    </f:facet>
                                    <h:outputText value="#{entry[2]}"/>
                                </rich:column>

                                <rich:column sortBy="#{entry[3]}">
                                    <f:facet name="header">
                                        <h:outputText value="#{msg.birthdate}"/>
                                    </f:facet>
                                    <h:outputText value="#{entry[3]}">
                                        <f:convertDateTime pattern="#{msg.date_pattern}" />
                                    </h:outputText>                                    
                                </rich:column>

                                

                                <rich:column sortBy="#{entry[4]}" width="20px">
                                    <f:facet name="header">
                                        <h:outputText value="#{msg.n_rich}"/>
                                    </f:facet>
                                    <h:outputText value="#{entry[4]}" />
                                </rich:column>

                                

                            </rich:dataTable>

                        </a4j:outputPanel>
                    </rich:panel>

                </h:form>
            </section>






        </body>
    </html>
</f:view>